import java.awt.Component;
import java.awt.Font;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;



class MyListCellRenderer extends DefaultListCellRenderer {
    final Font normal = new java.awt.Font("Tahoma",0,11);
    final Font comp = new java.awt.Font("Tahoma",1,11);
    
    public MyListCellRenderer() {
        setOpaque(true);
    }

    /* This is the only method defined by ListCellRenderer.  We just
     * reconfigure the Jlabel each time we're called.
     */
    public Component getListCellRendererComponent(
        JList list,
	CII_Tree_Vectors value,   // value to display
	int index,      // cell index
	boolean iss,    // is the cell selected
	boolean chf)    // the list and the cell have the focus
    {
        /* The DefaultListCellRenderer class will take care of
         * the JLabels text property, it's foreground and background
         * colors, and so on.
         */
        super.getListCellRendererComponent(list, value, index, iss, chf);
System.out.println("render: "+ value.get(2));
        /* We additionally set the JLabels icon property here.
         */
        String s = value.get(2);
	setFont((s.equals("CIIlib.TABLE_TYPE.COMP")) ? comp : normal);

	return this;
    }
}
